home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17472 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: ix.netcom.com!news
  2. From: Mschae04@ix.netcom.com (Mark Schaefer)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Newbie question
  5. Date: Mon, 15 Apr 1996 13:42:35 GMT
  6. Organization: Netcom
  7. Message-ID: <4ktjr5$6go@dfw-ixnews7.ix.netcom.com>
  8. References: <4kq1d5$253@ginger.lei.net>
  9. NNTP-Posting-Host: ix-tac-wa2-04.ix.netcom.com
  10. X-NETCOM-Date: Mon Apr 15  8:44:05 AM CDT 1996
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. anomoous@penet.fi wrote:
  14.  
  15. >I just started a C++ class in school, and I was writing my first project.  I 
  16. >have to include a char, double, int, and a string.  The program compiled just 
  17. >fine, but when I run the program I get a fatal error that says I have a float 
  18. >overflow.  I know I must be missing something extremely basic, but the help 
  19. >files were no help.  The input was digit with two decimal places.  I used the 
  20. >following statement to define the precision.
  21. >cout.setf(ios::showpoint);
  22. >cout.precision (4);
  23.  
  24. >Any help would be appreciated.
  25.  
  26. >Everyone was once a Newbie........I think.
  27. I'm new at C++, as well as posting, but here goes. The book I'm using
  28. says to include  cout.setf(ios::fixed);  with the other two cout
  29. statements you listed in your message. Good luck.
  30.  
  31.